package com.sali.service.data_processor.chain.handlers;

import com.sali.commons.exception.ProcessChainHandlerInitException;
import com.sali.commons.exception.ProcessChainHandlerProcessException;
import com.sali.entity.ProcessDefinition;
import com.sali.entity.TransferObject;
import com.sali.service.data_file_uploader.refcount.ReferenceManager;
import com.sali.service.data_processor.chain.IProcessChainHandler;

// 做一些后置处理，当处理链路出现异常时，跳转到这里，完成一些必须的操作
public class TailChainHandler implements IProcessChainHandler {
    @Override
    public void preProcess(ProcessDefinition processDefinition) throws ProcessChainHandlerInitException {

    }

    @Override
    public void process(TransferObject input) throws ProcessChainHandlerProcessException {
        ReferenceManager.outputRecordInc(input.getSourceFileId());
    }
}
